import { HTMLElement } from 'node-html-parser';
import get_nodes_by_tagname_or_id from './utils/get-node-by-id';

export default function init(no: string, html: string, doc: HTMLElement) {
	const node_list = get_nodes_by_tagname_or_id(no, doc);
	for (let i = 0; i < node_list.length; i++) {
		const node = node_list[i];
		if (html) {
			node.set_content(html);
		}
	}
}
